package com.vincent.vo;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

public class SaveArticleVo {
    @NotNull(message = "文章标题不能为空")
    @NotEmpty(message = "文章标题不能为空")
    @Length(max = 50,message = "文章标题不能超过50个字符")
    private String title;
    @Min(value = 1,message = "文章类别不能为空")
    private int categoryId;

    private String isPublish;

    private String isTop;
    @NotNull(message = "文章内容不能为空")
    @NotEmpty(message = "文章内容不能为空")
    private String content;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public String getIsPublish() {
        return isPublish;
    }

    public void setIsPublish(String isPublish) {
        this.isPublish = isPublish;
    }

    public String getIsTop() {
        return isTop;
    }

    public void setIsTop(String isTop) {
        this.isTop = isTop;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


}
